//
//  CheckNetWork.m
//  TenYearsLater
//
//  Created by 任晓松 on 14-4-13.
//  Copyright (c) 2014年 十年后. All rights reserved.
//

#import "CheckNetWork.h"
#import "Reachability.h"

@implementation CheckNetWork

+(BOOL)isExistenceNetwork
{
	BOOL isExistenceNetwork;
	Reachability *r = [Reachability reachabilityForInternetConnection];
    
    switch ([r currentReachabilityStatus])
    {
        case NotReachable:
			isExistenceNetwork = FALSE;
            break;
        case ReachableViaWWAN:
			isExistenceNetwork = TRUE;
            break;
        case ReachableViaWiFi:
			isExistenceNetwork = TRUE;
            break;
    }
	return isExistenceNetwork;
}

@end
